/************************************************************************************
* PlayerWindow.h                                                                    *
*                                                                                   *
* Copyright (C) 2011 Varuna L Amachi                                                *
*                                                                                   *
* This program is free software; you can redistribute it and/or modify              *
* it under the terms of the GNU General Public License as published by              *
* the Free Software Foundation; either version 2 of the License, or any             *
* later version.                                                                    *
*                                                                                   *
* This program is distributed in the hope that it will be useful, but               *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY        *
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for       *
* more details. You should have received a copy of the GNU General Public           *
* License along with this program; if not, write to the Free Software Foundation,   *
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                       *
*                                                                                   *
*************************************************************************************/

#ifndef PLAYERWINDOW_H
#define PLAYERWINDOW_H

#include <QMainWindow>
#include <QTableView>
#include <QSplitter>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QProgressDialog>


#include "player/PlayerWidget.h"
#include "player/PlaylistWidget.h"
#include "YampManager.h"



class PlayerWindow : public QMainWindow
{
    Q_OBJECT
    QHBoxLayout     *m_mainLayout;
    QVBoxLayout     *m_playerLayout;
    PlayerWidget    *m_player;
    PlaylistWidget  *m_playlistWidget;
    YampManager     *m_manager;
    QWidget         *m_oldMan;
    QByteArray      m_geometry;

public:
    explicit PlayerWindow(QWidget *parent = 0);
    ~PlayerWindow();

private slots:
    void updatePlayerActions();
    void playSelected();
    void disablePlayerActions();
    void trackFinished();
    void showPlayer(bool val);
    void itemChanged(MediaItem* item);
    void collectorItemsDeleted(QList<QString> *item);
//    void collectionDeletionStarted();
//    void collectionDeletionEnded();
    void showEvent(QShowEvent *);

private:
    void setupManager();
    void makeConnections();
    void setUpUI();

};

#endif // PLAYERWINDOW_H
